query($sql); while($result=$DB->fetch_array($query)) { $MenuStr .="
  • ".$result[kindName]." "; } $tpl->assign("MenuStr",$MenuStr); $cid=intval(trim($_GET["cid"])); if ($cid) { $sql="select * from db_kinds where id='$cid'"; $query=$DB->query($sql); $result=$DB->fetch_array($query); $title=$result["kindName"]; $tpl->assign("curTitle",$title); $pagePos="> 首页 > 名流产品 > ".$title.""; } else { $tpl->assign("curTitle","名流产品"); $pagePos="> 首页 > 名流产品"; } $pagePos="首页 名流产品"; $tpl->assign("pagePos",$pagePos); $topTitle = "名流产品"; $tpl->assign("topTitle",$topTitle); $sql="select * from h_product"; if ($cid) { $sql .=" where kindID=$cid"; } $sql .=" order by id desc"; $query=$DB->query($sql); $totalRDS=@$DB->num_rows($query); $pageno=$_GET["pageno"]; if (!isset($pageno)) { $pageno=1; } $startpos=($pageno-1)*$maxline; $totalPage=ceil($totalRDS/$maxline); $sql=$sql." limit $startpos,$maxline"; $query=$DB->query($sql); while($result=$DB->fetch_array($query)) { $Produdct=""; $ProductName="".$result[productName].""; $thePageData[]=array("Produdct"=>$Produdct,"ProductName"=>$ProductName); } $tpl->assign("thePageData",$thePageData); $URL=getUrl(); $mpage="共".$totalRDS."条记录  ".mtilPage(4,$pageno,$totalPage,$URL); $tpl->assign("mpage",$mpage); //---------------页面标题、KEYWORDS------------- $pageTitle="名流产品".$_SGLOBAL["page_title"]; $pagekeywords=$_SGLOBAL["page_keyword"]; $tpl->assign("pageTitle",$pageTitle); $tpl->assign("pagekeywords",$pagekeywords); //---------------页面标题、KEYWORDS------------- $tplpath=""; $tpl->display($tplpath."products.html"); ?>